﻿using Grpc.Core;

namespace WebApplication1_Grpc_Server.Grpc.Services
{
    public class DateService:MyDate.MyDateBase
    {
        public override Task<GetCurrentDatetimeReply> GetCurrentDatetime(GetCurrentDatetimeRequest request, ServerCallContext context)
        {
            return Task.FromResult<GetCurrentDatetimeReply>(new GetCurrentDatetimeReply { Datetime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") });
        }
    }
}
